package com.frain.springcloud.util;

/**
 * 
 * @ClassName: HttpRequestObjectBuilder 
 * @Description: 建造请求参数 
 * @author frain
 * @date 2018年8月15日 上午11:53:32 
 *
 */
public class HttpRequestObjectBuilder {
    private HttpRequestObject requestObject;

    private HttpRequestObjectBuilder() {
        super();

        requestObject = new HttpRequestObject();
    }

    public static HttpRequestObjectBuilder newInstance() {
        return new HttpRequestObjectBuilder();
    }

    public HttpRequestObjectBuilder url(String url) {

        requestObject.setUrl(url);
        return this;
    }

    public HttpRequestObjectBuilder paramObject(String anParamObject) {
        requestObject.setParamObject(anParamObject);
        return this;
    }

    public HttpRequestObjectBuilder requestType(String requestType) {
        requestObject.setRequestType(requestType);
        return this;
    }

    public HttpRequestObjectBuilder requestEncode(String requestEncode) {
        requestObject.setRequestEncode(requestEncode);
        return this;
    }

    public HttpRequestObject builder() {

        return requestObject;
    }
}
